﻿<%@ Page Title="" Language="C#" MasterPageFile="~/App_Master/AdminMaster2.master" AutoEventWireup="true" CodeFile="my_friendlyurl.aspx.cs" Inherits="my_tongji" %>
 

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<script src="../App_Themes/js/calendar1.js" type="text/javascript"></script>
<style type="text/css">
.ck_list{ width:950px; height:22px; padding:10px 0px; color:#555555; font-size:12px; border-bottom:1px solid #dddddd;}
.ck_list1{ width:950px; height:22px; padding:10px 0px; color:#555555; font-size:12px; border-bottom:1px solid #dddddd;}
.ck_list_xm{ height:22px; display:block; padding:0px 7px 0px 14px; line-height:22px; float:left;}
.ck_input_a{ width:200px; height:20px; float:left; border:1px solid #bababa; padding:0px 2px; _height:17px; _padding:3px 2px 0px 2px; margin-right:4px;}
.span_lb{ width:22px; height:20px; float:left; cursor:pointer;}
.ck_input_d{ width:400px; height:20px; float:left; border:1px solid #bababa; padding:0px 2px; _height:17px; _padding:3px 2px 0px 2px; margin:0px 36px 0px 6px;}
.shanchu{ width:14px; height:14px; margin:3px 17px; display:block; float:right;  background:url(../App_Themes/images/cha.jpg) no-repeat 0px 0px; cursor:pointer;}
.zj{ width:922px; height:22px; padding:10px 14px; font-size:12px;}
.zj_an{ display:block; width:83px; height:32px; float:left; background:url(../App_Themes/images/jia.jpg) no-repeat 0px -40px; cursor:pointer;}
.zj_ts{display:block; height:22px; float:left; color:#ff075b; line-height:22px; padding-left:10px;}
.zj_input_a{float:right; margin:5px 5px 0px 0px; _margin:1px 1px 0px 0px;}
.zj_bc{display:block; height:22px; float:right; line-height:22px; color:#555555;}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
  <div class="box">
  <div class="ck1">
  客服热线
  <div class="ck_list1"  >
<span class="ck_list_xm">客服热线</span>
<input   type="text" class="ck_input_a" id="adminphone" name="adminphone"  value="<%=Manageadmin.adminphone%> " />
<span class="ck_list_xm">在线时间</span>
<input   type="text" class="ck_input_d"  id="worktime" name="worktime"   value="<%=Manageadmin.worktime%>"/>&nbsp;&nbsp;
 
<span class="clear"></span></div>
  </div>
  </div>
  <div class="box">
<div class="ck">
友情链接列表
<%if(model!=null){
for(int i=1;i<model.Count+1;i++){ %>
<div class="ck_list" id="<%=i %>">
<span class="ck_list_xm">网站名称</span>
<input name="mingc_<%=i %>" type="text" class="ck_input_a" value="<%=model[i-1].w_name %>" />
<span class="ck_list_xm">网站地址</span>
<input name="dizhi_<%=i %>" type="text" class="ck_input_d" value="<%=model[i-1].w_url %>" />&nbsp;&nbsp;
<span class="shanchu" onclick="shanchu(<%=i %>);"></span>
<span class="clear"></span></div>
<%}}%>

</div>
<div class="zj">
<span class="zj_an"></span>
<span class="zj_ts"></span> 
<span class="clear"></span>
</div>
<div class="zj">
 <a onclick="javascript:checkFrmSubmit();">保存</a>
</div>
</div>
 
        <div class="clear">
        </div>
    
    <script language="javascript" type="text/javascript">

        function checkFrmSubmit() {
            var num = $(".ck_list").size();
           jQuery('form').attr("action", "/Ajax/Otsql.ashx?t=add_friendly&num="+num).submit();
        }
        </script>
        <script type="text/javascript">
$(document).ready(function(){
 
$(".zj_an").click(function(){
  var x = $(".ck_list").size();
 $(".ck").append('<div class="ck_list" id="'+(x+1)+'"><span class="ck_list_xm">网站名称</span><input name="mingc_'+(x+1)+'" type="text" class="ck_input_a"   /><span class="ck_list_xm">网站地址</span><input name="dizhi_'+(x+1)+'" type="text" class="ck_input_d"  /><span class="shanchu" onclick="shanchu('+(x+1)+');"></span><span class="clear"></span></div>');
	$(".zj_ts").html("");
	});
  });

  var shanchu = function (index) {
      var x = $(".ck_list").size();
      var i = "";
      if (x > 1) {
 
          $("#" + index).remove() ;
     }
             else {
                $(".zj_ts").html("至少保留一个链接");
            }
  }
</script>
    
</asp:Content>
